@extends('admin/goods/layout')

@section('content')
<div class="mws-panel grid_8">

@if (count($errors) > 0)
    <div class="mws-form-message error">
    	错误提醒
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
<style type="text/css">	
	.container{
		display:none;
	}
</style>
<div class="mws-panel-header">
    	<span>商品修改 | <a href="/admin/goods/index?id={{$data['pid']}}">点击查看商品列表</a></span>
      
    </div>
    <div class="mws-panel-body no-padding">
    	<form class="mws-form" action="/admin/goods/update" method="post" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{{$data['id']}}">
    	{{ csrf_field()}}
    		<div class="mws-form-inline">
    		 
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品名</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="name" value="{{$data['name']}}">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品标题</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="title" value="{{$data['title']}}">
    				</div>
    			</div>
    		   <div class="mws-form-row" >
                    <label class="mws-form-label">商品内容</label>
                    <div class="mws-form-item" style="width:500px" >
                    <script name="content" id="container" type="text/plain"  value="{!!$data['content']!!}"></script>
                     <script type="text/javascript" src="/u/ueditor.config.js"></script>
                <!-- 编辑器源码文件 -->
                <script type="text/javascript" src="/u/ueditor.all.js"></script>
                <!-- 实例化编辑器 -->
                <script type="text/javascript">
                var ue = UE.getEditor('container');
            </script>
                    </div>
                </div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品价格</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="price" value="{{$data['price']}}"> 
    				</div>

    			</div>
    			<div>
                    </div>
                     <div class="mws-form-row" >
                    <label class="mws-form-label">商品封面图片</label>
                    <div class="mws-form-item" style="width:500px">
                        <input class="small" type="file" name="gpic"  value="{{$data['gpic']}}"> 
                        <img src="/upload/{{$data['gpic']}}" alt="" style="width:100px">
                    </div>
                    <div class="mws-form-item" >
     
                    </div>
                </div>
    		
                    <div class="mws-form-row">
                    <label class="mws-form-label">快递费用</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="express" value="{{$data['express']}}"> 
                    </div>
                </div>

             
                    <div class="mws-form-row">
                    <label class="mws-form-label">商品型号</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="model" value="{{ $data['model']}}"> 
                    </div>
                </div>
    		 
    		                    <div class="mws-form-row">
                    <label class="mws-form-label">商品内存</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="memory" value="{{$data['memory']}}"> 
                    </div>
          
					</div>
                    <div class="mws-form-row">
                    <label class="mws-form-label">发货地</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="locations" value="{{ $data['locations']}}"> 
                    </div>
                </div>
           
                     <div class="mws-form-row">
                    <label class="mws-form-label">所属轮播图</label>
                    <div class="mws-form-item">
                       <select name="lid" id="">
                         <option value="">其他</option>
                       @foreach($pic as $k=>$v)
                           <option value="{{$v['id']}}">{{$v['name']}}</option>
                        @endforeach   
                       </select>
                    </div>
                </div>
                                    <div class="mws-form-row">
                    <label class="mws-form-label">颜色</label>
                    <div class="mws-form-item">
                       <select name="color" id="">
                             <option value="黑色">黑色</option>
                             <option value="玫瑰金">玫瑰金</option>
                             <option value="白色">白色</option>
                            <option value="金色">金色</option>
                       </select>
                    </div>
                </div>
                   <div class="mws-form-row">
                    <label class="mws-form-label">是否上架</label>
                    <div class="mws-form-item">
                   上架 <input type="radio" name="status" value="1" checked>
                   下架 <input type="radio" name="status" value="2">
                    </div>
                </div>
                    <div class="mws-form-row" >
                    <label class="mws-form-label">商品详细图片</label>
                    <div class="mws-form-item" style="width:500px">
                        <input class="small" type="file" name="xpic" multiple value=""> 
                    </div>
                    <div class="mws-form-item" >
     
                    </div>
                </div>
                   <div class="mws-form-row" >
                    <label class="mws-form-label">商品详细图片</label>
                    <div class="mws-form-item" style="width:500px">
                        <input class="small" type="file" name="xxpic" multiple value=""> 
                    </div>
                    <div class="mws-form-item" >
     
                    </div>
                </div>  
                  

    		<div class="mws-button-row">
    			<input value="修改" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>
@endsection